package com.changgou.goods.dao;

import com.changgou.goods.pojo.Spu;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface SpuMapper extends Mapper<Spu> {

    @Select("SELECT COUNT(id) FROM tb_spu")
    public int findAll();

    @Select("SELECT COUNT(is_marketable) FROM tb_spu WHERE is_marketable=#{state}")
    public int findState(Integer state);
}
